emacs.git
11 months agoExplain, how to suppress Tramp warnings
Michael Albinus [Wed, 2 Apr 2025 16:37:22 +0000 (18:37 +0200)]
Explain, how to suppress Tramp warnings

* doc/misc/tramp.texi (Frequently Asked Questions): Remove double item.
(Traces and Profiles): Mention `warning-suppress-types'.  (Bug#77422)

11 months agoprinted manuals: xrefs in and out of "Preparing Patches"
Stephen Gildea [Tue, 1 Apr 2025 05:34:20 +0000 (22:34 -0700)]
printed manuals: xrefs in and out of "Preparing Patches"

Fix two cases of links where the on-line manual is one document but the
manual is split into separate documents for printing:

* doc/emacs/package.texi (Fetching Package Sources): fix printed link to
"Preparing Patches" to point to separate document.
* doc/emacs/vc1-xtra.texi (Preparing Patches): fix printed link to
"Directory Variables" to point to separate document.

11 months agoFix Tramp's file-attributes cache
Michael Albinus [Tue, 1 Apr 2025 13:24:44 +0000 (15:24 +0200)]
Fix Tramp's file-attributes cache

* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p):
Check also for sticky bit.
(tramp-adb-handle-file-readable-p): Simplify.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p):
Check also for sticky bit.  Force `file-attributes' check.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for sticky bit.
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-writable-p): Simplify.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p):
Check also for sticky bit.
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p): Simplify.

* lisp/net/tramp.el (tramp-use-file-attributes): Fix docstring.
(tramp-handle-file-readable-p, tramp-handle-file-writable-p):
Force `file-attributes' check.  Use `file-truename' for symbolic links.
(tramp-check-cached-permissions): New optional argument FORCE.
Fix symlink check.  Check also for sticky bit.  (Bug#77402)

* test/lisp/net/tramp-tests.el
(tramp-test20-file-modes-without-file-attributes)
(tramp-test21-file-links-without-file-attributes): New tests.

11 months agoFix compilation errors due to insufficient compiler safety (bug#63288)
Pip Cet [Mon, 17 Feb 2025 15:21:16 +0000 (15:21 +0000)]
Fix compilation errors due to insufficient compiler safety (bug#63288)

The default safety level is 1.  Restoring the default safety level to
1 after it was temporarily 0 should reset byte-compile-delete-errors
to nil, its default level.  Failing to do that resulted in
miscompilation of code in highly-parallel builds.

* lisp/emacs-lisp/cl-macs.el (cl--do-proclaim): Change
'byte-compile-delete-errors' to become t only at 'safety' level 0, not
levels 1 or 2.

(cherry picked from commit 53a5dada413662389a17c551a00d215e51f5049f)

11 months agoBackport expansion of Time Stamp documentation
Stephen Gildea [Sun, 30 Mar 2025 18:39:53 +0000 (11:39 -0700)]
Backport expansion of Time Stamp documentation

* doc/emacs/files.texi (Time Stamps): Add examples of enabling
time stamping with add-hook, setting time-stamp-pattern as a
file-local variable, and showing a time stamp at the end of a
file.  Divide into three sections.
* doc/emacs/emacs.texi: Add new nodes to menu.
* lisp/info.el (Info-file-list-for-emacs): Remove entry that
points Info at time-stamp discussion in the Autotype document.
* lisp/time-stamp.el (time-stamp-format, time-stamp-active,
time-stamp-count, time-stamp-pattern, time-stamp, time-stamp-string):
Expand doc strings.  Include Info cross-references.

Cherry picked from commits on the main branch.
Do not merge to master.

11 months ago; Improve the documentation of 'slice' display spec (bug#77384).
Eli Zaretskii [Sun, 30 Mar 2025 16:27:22 +0000 (19:27 +0300)]
; Improve the documentation of 'slice' display spec (bug#77384).

11 months ago; * src/editfns.c (Fmessage): Mention 'inhibit-message' (bug#77257).
Eli Zaretskii [Sun, 30 Mar 2025 14:38:25 +0000 (17:38 +0300)]
; * src/editfns.c (Fmessage): Mention 'inhibit-message' (bug#77257).

11 months agoSync with Tramp 2.7.3-pre
Michael Albinus [Sun, 30 Mar 2025 13:53:47 +0000 (15:53 +0200)]
Sync with Tramp 2.7.3-pre

* doc/misc/tramp.texi: Use @dots{} where appropriate.
(External methods): Precise remark on rsync speed.
(Customizing Methods): Add incus-tramp.
(Password handling): Mention expiration of cached passwords when a
session timeout happens.
(Predefined connection information): Mention also "androidsu" as
special case of "tmpdir".
(Ad-hoc multi-hops, Frequently Asked Questions):
Improve description how ad-hoc multi-hop file names can be made
persistent.  (Bug#65039, Bug#76457)
(Remote processes): Signals are not delivered to remote direct
async processes.  Say, that there are restrictions for transfer of
binary data to remote direct async processes.
(Bug Reports): Explain bisecting.
(Frequently Asked Questions): Improve index.  Speak about
fingerprint readers.  Recommend `small-temporary-file-directory'
for ssh sockets.
(External packages): Rename subsection "Timers, process filters,
process sentinels, redisplay".
(Extension packages): New node.
(Top, Files directories and localnames): Add it to @menu.

* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
(tramp-repository-branch, tramp-repository-version):
Remove ;;;###tramp-autoload cookie.

* lisp/net/tramp-adb.el:
* lisp/net/tramp-androidsu.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-container.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-message.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sshfs.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp.el: Use `when-let*', `if-let*' and `and-let*'
consequently.  (Bug#73441)

* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Move setting of sentinel up.

* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Add ;;;###tramp-autoload cookie.
(tramp-archive-local-file-name): New defun.

* lisp/net/tramp-cache.el (tramp-connection-properties): Add link
to the Tramp manual in the docstring.
(tramp-get-connection-property, tramp-set-connection-property):
Don't raise a debug message for the `tramp-cache-version' key.
(with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Add traces.
(tramp-dump-connection-properties): Don't save connection property
"pw-spec".

* lisp/net/tramp-cmds.el (tramp-repository-branch)
(tramp-repository-version): Declare.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
(tramp-gvfs-do-copy-or-rename-file): Don't use the truename.
Handle symlinks.
(tramp-gvfs-local-file-name): New defun.

* lisp/net/tramp-message.el (tramp-repository-branch)
(tramp-repository-version): Declare.
(tramp-error-with-buffer, tramp-user-error): Don't redisplay in
`sit-for'.  (Bug#73718)
(tramp-warning): Fix `lwarn' call.

* lisp/net/tramp.el (tramp-read-passwd):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command):
Rename connection property "password-vector" to "pw-vector".

* lisp/net/tramp-sh.el (tramp-methods) <pscp, psftp>:
Adapt `tramp-copy-args' argument.
(tramp-get-remote-pipe-buf, tramp-actions-before-shell):
Use `tramp-fingerprint-prompt-regexp'.
(tramp-sh-handle-copy-directory):
Apply `tramp-do-copy-or-rename-file-directly' if possible.
(tramp-do-copy-or-rename-file): Refactor.  Handle symlinks.
(Bug#76678)
(tramp-plink-option-exists-p): New defun.
(tramp-ssh-or-plink-options): Rename from
`tramp-ssh-controlmaster-options'.  Adapt further plink options.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Adapt calls.
(tramp-sh-handle-make-process): Don't set connection property
"remote-pid", it's unused.
(tramp-sh-handle-process-file): Do proper quoting.
(tramp-vc-file-name-handler): Add `file-directory-p', which is
used in `vc-find-root'.  (Bug#74026)
(tramp-maybe-open-connection): Use connection property "hop-vector".
(tramp-get-remote-pipe-buf): Make it more robust.

* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-handle-copy-directory): Don't check existence of
DIRNAME, this is done in `tramp-skeleton-copy-directory' already.
(tramp-smb-handle-copy-file, tramp-smb-handle-rename-file): Refactor.

* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
STDERR is not implemented.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Don't use the truename.  Handle symlinks.

* lisp/net/tramp.el (tramp-mode): Set to nil on MS-DOS.
(tramp-otp-password-prompt-regexp): Add TACC HPC prompt.
(tramp-wrong-passwd-regexp): Add fingerprint messages.
(tramp-fingerprint-prompt-regexp, tramp-use-fingerprint):
New defcustoms.
(tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-barf-if-file-missing): Accept also symlinks.
(tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.
(tramp-skeleton-process-file): Raise a warning if STDERR is not
implemented.
(tramp-skeleton-set-file-modes-times-uid-gid): Fix typo.
(tramp-compute-multi-hops): Check for
`tramp-sh-file-name-handler-p', it works only for this.
(tramp-handle-shell-command):
Respect `async-shell-command-display-buffer'.
(tramp-action-password, tramp-process-actions): Use connection
property "hop-vector".
(tramp-action-fingerprint, tramp-action-show-message): New defuns.
(tramp-action-show-and-confirm-message): Start check at (point-min).
(tramp-wait-for-regexp): Don't redisplay in `sit-for'.  (Bug#73718)
(tramp-convert-file-attributes): Don't cache
"file-attributes-ID-FORMAT".
(tramp-read-passwd, tramp-clear-passwd): Rewrite.  (Bug#74105)

* test/lisp/net/tramp-tests.el (auth-source-cache-expiry)
(ert-batch-backtrace-right-margin): Set them to nil.
(vc-handled-backends): Suppress if noninteractive.
(tramp--test-enabled): Cleanup also
`tramp-compat-temporary-file-directory'.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test18-file-attributes, tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls)
(tramp--test-deftest-without-file-attributes)
(tramp-test21-file-links, tramp-test28-process-file)
(tramp-test32-shell-command, tramp-test36-vc-registered)
(tramp-test39-make-lock-file-name, tramp--test-check-files)
(tramp-test42-utf8, tramp-test43-file-system-info)
(tramp-test44-file-user-group-ids, tramp-test47-read-password):
Adapt tests.
(tramp-test47-read-fingerprint): New test.

11 months agolisp/emacs-lisp/cl-macs.el (cl-labels): Fix docstring (bug#77348)
Stefan Monnier [Sun, 30 Mar 2025 04:44:50 +0000 (00:44 -0400)]
lisp/emacs-lisp/cl-macs.el (cl-labels): Fix docstring (bug#77348)

11 months agoFix minor issues in documentation of `use-package'
Dominik Schrempf [Thu, 27 Mar 2025 14:54:52 +0000 (15:54 +0100)]
Fix minor issues in documentation of `use-package'

(Bug#77311)

Copyright-paperwork-exempt: yes

11 months agoPHP should be in the PATH, either locally or remotely. (bug#76242).
Vincenzo Pupillo [Fri, 14 Mar 2025 20:11:22 +0000 (21:11 +0100)]
PHP should be in the PATH, either locally or remotely. (bug#76242).

* lisp/progmodes/php-ts-mode.el
(php-ts-mode-php-default-executable): Renamed from
'php-ts-mode-php-executable'.
(php-ts-mode--executable): New function that returns the absolute
filename of the PHP executable, local or remote, based on
'default-directory'.
(php-ts-mode--anchor-prev-sibling): Replaced 'when-let' with
“when-let*.”
(php-ts-mode--indent-defun): Replaced 'when-let' with
'when-let*'.
(php-ts-mode-run-php-webserver): Use the new function
(php-ts-mode-php-default-executable).
(run-php): Use the new function (php-ts-mode-php-default-executable).

11 months agoAvoid warning when loading 'go-ts-mode'
Eli Zaretskii [Sat, 29 Mar 2025 10:36:02 +0000 (13:36 +0300)]
Avoid warning when loading 'go-ts-mode'

* lisp/progmodes/go-ts-mode.el (treesit-ready-p): Silence the
warning if the gomod language library is not installed.
(Bug#77213)

11 months ago; Fix package-version values
Eli Zaretskii [Thu, 27 Mar 2025 11:52:22 +0000 (13:52 +0200)]
; Fix package-version values

* lisp/textmodes/rst.el (rst-compile-toolsets):
* lisp/which-key.el (which-key-idle-delay): Fix package-version.

11 months ago; * lisp/which-key.el (which-key-idle-delay): Fix package-version.
Eli Zaretskii [Thu, 27 Mar 2025 11:49:10 +0000 (13:49 +0200)]
; * lisp/which-key.el (which-key-idle-delay): Fix package-version.

11 months agopeg.texi: Fix bug#76555 even a bit more
Yue Yi [Wed, 26 Mar 2025 02:22:08 +0000 (22:22 -0400)]
peg.texi: Fix bug#76555 even a bit more

* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix other part of the grammar of `define-peg-ruleset` example.

11 months agopeg.texi: Fix bug#76555 even a bit more
Yue Yi [Wed, 26 Mar 2025 02:20:50 +0000 (22:20 -0400)]
peg.texi: Fix bug#76555 even a bit more

* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix grammar of `define-peg-ruleset` example.

11 months agoPEG: Fix bug#76555
Stefan Monnier [Wed, 26 Mar 2025 02:17:05 +0000 (22:17 -0400)]
PEG: Fix bug#76555

* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix `define-peg-ruleset` example.

* lisp/progmodes/peg.el (define-peg-rule): Fix indent rule.

11 months ago; Minor update in ack.texi
Stefan Kangas [Wed, 26 Mar 2025 00:03:06 +0000 (01:03 +0100)]
; Minor update in ack.texi

* doc/emacs/ack.texi (Acknowledgments): Mention eglot in entry for João
Távora.

11 months ago; Improve type specifier documentation
Stefan Kangas [Tue, 25 Mar 2025 22:16:11 +0000 (23:16 +0100)]
; Improve type specifier documentation

* doc/lispref/functions.texi (Declare Form): Clarify wording for
precision and consistency; note consequences of incorrect declarations.
* doc/lispref/objects.texi (Type Specifiers): Mention use by the native
compiler; tighten wording.

11 months ago; Improve documentation of "function types"
Eli Zaretskii [Tue, 25 Mar 2025 12:37:17 +0000 (14:37 +0200)]
; Improve documentation of "function types"

* doc/lispref/functions.texi (Declare Form):
* doc/lispref/objects.texi (Type Specifiers): Improve wording and
indexing.

11 months ago; * admin/notes/spelling: More precisely qualify saying just "Lisp"
Sean Whitton [Mon, 24 Mar 2025 02:40:09 +0000 (10:40 +0800)]
; * admin/notes/spelling: More precisely qualify saying just "Lisp"

11 months agoAdd a choice to 'dired-movement-style' to restore the previous behavior
Juri Linkov [Sun, 23 Mar 2025 17:48:28 +0000 (19:48 +0200)]
Add a choice to 'dired-movement-style' to restore the previous behavior

* lisp/dired.el (dired-movement-style): Add new values
'bounded-files' and 'cycle-files' (bug#76596).
(dired--move-to-next-line): Use new values for users
who prefer the default behavior of Emacs 30.1.

11 months ago; Fix some markup in doc/lispref/commands.texi.
Basil L. Contovounesios [Sun, 23 Mar 2025 17:13:52 +0000 (18:13 +0100)]
; Fix some markup in doc/lispref/commands.texi.

11 months agoImprove docstring of should-error
Stefan Kangas [Sun, 23 Mar 2025 16:40:22 +0000 (17:40 +0100)]
Improve docstring of should-error

* lisp/emacs-lisp/ert.el (should-error): Improve docstring.

11 months agoUse debian:bookworm for emba tests (don't merge)
Michael Albinus [Sun, 23 Mar 2025 08:33:57 +0000 (09:33 +0100)]
Use debian:bookworm for emba tests (don't merge)

There are problems with treesitter installation from debian:sid.

* test/infra/Dockerfile.emba (emacs-base): Use debian:bookworm.
(emacs-eglot, emacs-tree-sitter): Use emacs-base.
(emacs-native-comp): Install libgccjit-12-dev.

11 months ago* lisp/treesit.el (treesit-indent-region): Handle markers (bug#77077).
Juri Linkov [Sat, 22 Mar 2025 18:37:35 +0000 (20:37 +0200)]
* lisp/treesit.el (treesit-indent-region): Handle markers (bug#77077).

Ensure that markers are converted to integers for 'beg' and 'end'.

11 months ago; * admin/notes/spelling: Grammar fix
Sean Whitton [Sat, 22 Mar 2025 13:07:28 +0000 (21:07 +0800)]
; * admin/notes/spelling: Grammar fix

11 months ago; Add index entry "code completion" to user manual
Stefan Kangas [Sat, 22 Mar 2025 08:05:08 +0000 (09:05 +0100)]
; Add index entry "code completion" to user manual

* doc/emacs/programs.texi (Symbol Completion): Improve indexing by
adding "code completion".  This is the name that this feature goes by
elsewhere, so users are likely to look for it.

11 months ago; * doc/emacs/programs.texi (Program Modes): Add info about Eglot.
Eli Zaretskii [Sat, 22 Mar 2025 07:04:48 +0000 (09:04 +0200)]
; * doc/emacs/programs.texi (Program Modes): Add info about Eglot.

11 months ago; admin/notes/spelling: Notes on abbreviation of "Emacs Lisp"
Sean Whitton [Fri, 14 Mar 2025 07:54:13 +0000 (15:54 +0800)]
; admin/notes/spelling: Notes on abbreviation of "Emacs Lisp"

11 months agoFix OSX build without pdumper
Jindrich Makovicka [Wed, 19 Mar 2025 09:03:09 +0000 (10:03 +0100)]
Fix OSX build without pdumper

* Makefile.in (install-arch-dep) [ns_self_contained]: Add missing
DUMPING = pdumper check.

Copyright-paperwork-exempt: yes

11 months ago; Add indexing for Eglot in user manual
Eli Zaretskii [Thu, 20 Mar 2025 08:41:26 +0000 (10:41 +0200)]
; Add indexing for Eglot in user manual

* doc/emacs/programs.texi (Imenu, Programming Language Doc)
(Symbol Completion):
* doc/emacs/maintaining.texi (Xref): Index Eglot-related
functionalities.

11 months ago; Change some instances of cl to cl-lib in docs
Stefan Kangas [Thu, 20 Mar 2025 01:05:55 +0000 (02:05 +0100)]
; Change some instances of cl to cl-lib in docs

* doc/misc/cl.texi (Overview):
* doc/misc/eieio.texi (CLOS compatibility, Wish List): Change 'cl' to
'cl-lib' where appropriate.

11 months ago; Improve introduction to use-package manual
Stefan Kangas [Wed, 19 Mar 2025 20:27:29 +0000 (21:27 +0100)]
; Improve introduction to use-package manual

* doc/misc/use-package.texi (Top): Improve introduction.

11 months ago; Add cross-references to push and pop docstrings
Stefan Kangas [Wed, 19 Mar 2025 20:27:38 +0000 (21:27 +0100)]
; Add cross-references to push and pop docstrings

* lisp/subr.el (push, pop): Add cross-references to Info manual.

11 months agoFix clipboard object handle leak on Android 3.1 to 11.0
Po Lu [Sun, 16 Mar 2025 12:12:52 +0000 (20:12 +0800)]
Fix clipboard object handle leak on Android 3.1 to 11.0

* src/androidselect.c (extract_fd_offsets): Release retrieved
ParcelFileDescriptor objects on APIs 12 through 30.

11 months agoOnly disable 'completion-preview-active-mode' when it is on
Eshel Yaron [Sun, 16 Mar 2025 08:45:25 +0000 (09:45 +0100)]
Only disable 'completion-preview-active-mode' when it is on

* lisp/completion-preview.el
(completion-preview--post-command): Avoid calling
'completion-preview-active-mode' to disable the mode when
already off, since it forces a costly redisplay. (Bug#76964)

11 months agoBackport Transient commit f69e1286
Jonas Bernoulli [Sat, 15 Mar 2025 19:29:58 +0000 (20:29 +0100)]
Backport Transient commit f69e1286

2025-03-12 f69e128654627275e7483a735f670bd53501999d
transient-suffix-object: Handle duplicated command invoked using mouse

Fixes bug#76680.

11 months ago; Doc fix for legacy keymap functions
Stefan Kangas [Sat, 15 Mar 2025 18:36:51 +0000 (19:36 +0100)]
; Doc fix for legacy keymap functions

* doc/lispref/keymaps.texi (Low-Level Key Binding): Add new alternatives
for two more legacy functions.

11 months ago; * doc/misc/ede.texi (Top): Improve introduction.
Stefan Kangas [Fri, 14 Mar 2025 23:18:28 +0000 (00:18 +0100)]
; * doc/misc/ede.texi (Top): Improve introduction.

11 months agoFix 'whitespace-mode' in CJK locales
Eli Zaretskii [Sat, 15 Mar 2025 11:42:12 +0000 (13:42 +0200)]
Fix 'whitespace-mode' in CJK locales

* lisp/international/characters.el (ambiguous-width-chars): Remove
U+00A4 and U+00B7 from the list of ambiguous-width characters.
(cjk-ambiguous-chars-are-wide): Doc fix.  (Bug#76852)

11 months ago; Improve documentation of 'gui-get-selection' use on X
Eli Zaretskii [Sat, 15 Mar 2025 09:48:36 +0000 (11:48 +0200)]
; Improve documentation of 'gui-get-selection' use on X

* doc/lispref/frames.texi (Window System Selections):
* lisp/select.el (gui-get-selection): Suggest to use an explicit
DATA-TYPE when calling 'gui-get-selection'.

11 months ago; Fix documentation of mouse-click events
Eli Zaretskii [Sat, 15 Mar 2025 08:04:01 +0000 (10:04 +0200)]
; Fix documentation of mouse-click events

* doc/lispref/commands.texi (Click Events): Add menu-bar events to
the description.  Add missing details about tab-bar click events.

(cherry picked from commit 6e28c2019e772aa19040cf17e314fcee23bb33d4)

11 months agoFix treesit-parser-create behavior regarding indirect buffers
Yuan Fu [Thu, 13 Mar 2025 07:33:47 +0000 (00:33 -0700)]
Fix treesit-parser-create behavior regarding indirect buffers

The previous fix fixed the problem that treesit-parser-create
always use the current buffer, but that introduce another subtle
problem: if an indirect buffer creates a parser, the parser
saves the base buffer rather than the indirect buffer.  In Emacs
29, if you create a parser in an indirect buffer, the parser
saves the indirect buffer.  This change of behavior breaks some
existing use-cases for people using indirect buffer with
tree-sitter.

In Emacs 31, indirect buffers and base buffer get their own
parser list, so this problem doesn't exist anymore.  The fix is
only for Emacs 30.

* src/treesit.c (Ftreesit_parser_create): Use the buffer that's
given to treesit-parser-create, even if it's an indirect buffer.

11 months ago; Fix with-delayed-message docstring metavars.
Basil L. Contovounesios [Thu, 13 Mar 2025 12:36:19 +0000 (13:36 +0100)]
; Fix with-delayed-message docstring metavars.

11 months agoFix 'dired-movement-style' in Dired when subdirs are shown
Eli Zaretskii [Thu, 13 Mar 2025 10:34:23 +0000 (12:34 +0200)]
Fix 'dired-movement-style' in Dired when subdirs are shown

* lisp/dired.el (dired--move-to-next-line): Don't consider
sub-directory lines as empty.  (Bug#76596)

11 months ago; * lisp/register.el (register-use-preview): Doc fix (bug#76739).
Eli Zaretskii [Thu, 13 Mar 2025 08:14:07 +0000 (10:14 +0200)]
; * lisp/register.el (register-use-preview): Doc fix (bug#76739).

11 months ago; Add texinfo reference to GNU Coding Standards.
Jeremy Bryant [Sun, 9 Mar 2025 22:25:03 +0000 (22:25 +0000)]
; Add texinfo reference to GNU Coding Standards.

* doc/emacs/trouble.texi (Coding Standards): Add texinfo reference to
GNU Coding Standards manual.  (Bug#76901)

11 months ago; * lisp/files.el (executable-find): Doc fix.
Eli Zaretskii [Wed, 12 Mar 2025 12:53:03 +0000 (14:53 +0200)]
; * lisp/files.el (executable-find): Doc fix.

11 months agoCorrect some outdated docs for hack-local-variables
Sean Whitton [Tue, 11 Mar 2025 06:35:48 +0000 (14:35 +0800)]
Correct some outdated docs for hack-local-variables

* doc/lispref/variables.texi (File Local Variables):
<hack-local-variables>: Say that it applies directory-local
variables too.  Add a cross-reference.
(Directory Local Variables): Document dir-local-variables-alist.
* lisp/files.el (hack-local-variables): Say that it always puts
into effect directory-local variables.

11 months ago; Backport ELisp->Elisp fix to etc/NEWS to ease merging
Sean Whitton [Wed, 12 Mar 2025 01:45:34 +0000 (09:45 +0800)]
; Backport ELisp->Elisp fix to etc/NEWS to ease merging

Do not merge to master.

11 months ago; Adapt comment in tramp.el
Michael Albinus [Tue, 11 Mar 2025 08:26:58 +0000 (09:26 +0100)]
; Adapt comment in tramp.el

11 months agoAdd keyword placeholder to tramp.el
Michael Albinus [Mon, 10 Mar 2025 16:40:51 +0000 (17:40 +0100)]
Add keyword placeholder to tramp.el

* lisp/net/tramp.el: Add Version, Package-Requires, Package-Type
and URL keywords.

11 months agoRewrite ERT manual introduction
Stefan Kangas [Sun, 9 Mar 2025 18:34:00 +0000 (19:34 +0100)]
Rewrite ERT manual introduction

* doc/misc/ert.texi (Top): Rewrite for clarity.  Don't give such
prominent mention to to TDD or JUnit, references which now seem dated.

11 months ago; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec
Harald Jörg [Sun, 9 Mar 2025 15:26:51 +0000 (16:26 +0100)]
; cperl-mode.el: Don't misinterpret exec_fcn as keyword exec

* lisp/progmodes/cperl-mode.el
(cperl-after-block-and-statement-beg): Recognize _ as part of a
Perl symbol.  Fixes Bug#76851

* test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts
Two new test cases around the edges of Bug#76851

11 months agoDocument return values of the various read-* functions
Eli Zaretskii [Sun, 9 Mar 2025 13:02:39 +0000 (15:02 +0200)]
Document return values of the various read-* functions

* lisp/textmodes/string-edit.el (read-string-from-buffer):
* lisp/simple.el (read-from-kill-ring, read-shell-command)
(read-signal-name):
* lisp/replace.el (read-regexp-case-fold-search):
* lisp/auth-source.el (read-passwd):
* lisp/subr.el (read-key, read-number):
* lisp/minibuffer.el (read-file-name, read-no-blanks-input):
* lisp/international/mule-cmds.el (read-multilingual-string):
* lisp/language/japan-util.el (read-hiragana-string):
* lisp/files-x.el (read-file-local-variable)
(read-file-local-variable-mode, read-file-local-variable-value):
* lisp/faces.el (read-face-font, read-face-name):
* lisp/simple.el (read-extended-command):
* lisp/env.el (read-envvar-name):
* lisp/files.el (read-directory-name):
* lisp/faces.el (read-color):
* lisp/international/mule-diag.el (read-charset):
* lisp/emacs-lisp/map-ynp.el (read-answer):
* src/coding.c (Fread_coding_system)
(Fread_non_nil_coding_system):
* src/minibuf.c (Fread_command, Fread_from_minibuffer):
* src/lread.c (Fread_char, Fread_char_exclusive, Fread_event): Doc
fixes.

11 months agoFix TAGS regeneration with Universal Ctags
Ben Scuron [Sat, 8 Mar 2025 03:29:36 +0000 (22:29 -0500)]
Fix TAGS regeneration with Universal Ctags

* lisp/progmodes/etags-regen.el (etags-regen--append-tags): Move
the "-o" option to before the filename, as Ctags doesn't allow
it to follow the file name.  (Bug#76855)

Copyright-paperwork-exempt: yes

11 months agoFix crash in daemon when "C-x C-c" while a client frame shows tooltip
Eli Zaretskii [Sat, 8 Mar 2025 09:31:22 +0000 (11:31 +0200)]
Fix crash in daemon when "C-x C-c" while a client frame shows tooltip

* src/frame.c (delete_frame): Ignore tooltip frames when looking
for other frames on the same terminal.  (Bug#76842)

(cherry picked from commit d2445c8c23595efdd444fce6f0c33ba66b596812)

12 months agoExplicitly document read-string return value
Stefan Kangas [Fri, 7 Mar 2025 17:10:53 +0000 (18:10 +0100)]
Explicitly document read-string return value

* src/minibuf.c (Fread_string): Document return value explicitly.
Better document PROMPT argument, and reflow docstring.  (Bug#76797)

12 months agoImprove docstrings of python.el import management
kobarity [Sun, 2 Mar 2025 08:37:36 +0000 (17:37 +0900)]
Improve docstrings of python.el import management

Added notes that when adding import statements for a file that
does not belong to a project, it may take some time to find
candidate import statements in the default directory.

* lisp/progmodes/python.el (python-add-import)
(python-fix-imports): Improve docstring.  (Bug#74894)

12 months ago; Improve doc strings of Speedbar
Eli Zaretskii [Fri, 7 Mar 2025 08:45:50 +0000 (10:45 +0200)]
; Improve doc strings of Speedbar

* lisp/speedbar.el (speedbar-extension-list-to-regex)
(speedbar-query-confirmation-method)
(speedbar-show-unknown-files, speedbar-use-imenu-flag)
(speedbar-track-mouse-flag, speedbar-default-position)
(speedbar-sort-tags, speedbar-directory-button-trim-method)
(speedbar-smart-directory-expand-flag)
(speedbar-hide-button-brackets-flag, speedbar-vc-do-check)
(speedbar-vc-indicator, speedbar-obj-do-check)
(speedbar-frame-mode, speedbar-handle-delete-frame)
(speedbar-show-info-under-mouse, speedbar-item-info)
(speedbar-item-rename, speedbar-item-delete)
(speedbar-initial-keymap, speedbar-insert-files-at-point)
(speedbar-generic-list-positioned-group-p)
(speedbar-generic-list-tag-p, speedbar-check-read-only)
(speedbar-tag-file, speedbar-tag-expand)
(speedbar-find-file-in-frame, speedbar-parse-tex-string)
(speedbar-buffer-click): Doc fixes.

12 months agoAvoid warnings about 'image-scaling-factor' in builds --without-x
Eli Zaretskii [Thu, 6 Mar 2025 13:49:27 +0000 (15:49 +0200)]
Avoid warnings about 'image-scaling-factor' in builds --without-x

* lisp/cus-start.el (standard): Exclude 'image-*' options if Emacs
was built without GUI support.  (Bug#76716)

12 months ago; * java/AndroidManifest.xml.in (Version-code): Update for Emacs 30.0.50.
Po Lu [Thu, 6 Mar 2025 13:41:06 +0000 (21:41 +0800)]
; * java/AndroidManifest.xml.in (Version-code): Update for Emacs 30.0.50.

12 months ago; Improve documentation of 2 symbol-related functions
Eli Zaretskii [Thu, 6 Mar 2025 10:52:05 +0000 (12:52 +0200)]
; Improve documentation of 2 symbol-related functions

* src/data.c (Fremove_pos_from_symbol, Fbare_symbol): Doc fixes.
(Bug#75290)

12 months agoFix etags tests broken by updating Copyright years
Eli Zaretskii [Thu, 6 Mar 2025 10:05:21 +0000 (05:05 -0500)]
Fix etags tests broken by updating Copyright years

* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good:
* test/manual/etags/CTAGS.good_crlf:
* test/manual/etags/CTAGS.good_update: Update.  (Bug#76744)

12 months agoFix some widgets in customize-dirlocals
Mauro Aranda [Thu, 6 Mar 2025 08:45:50 +0000 (05:45 -0300)]
Fix some widgets in customize-dirlocals

* lisp/cus-edit.el (custom-dynamic-cons-value-create): Make sure
to eval the keymap property.  (Bug#76756)

12 months agoFix register-use-preview behavior with never value
Thierry Volpiatto [Wed, 5 Mar 2025 09:37:03 +0000 (10:37 +0100)]
Fix register-use-preview behavior with never value

Allow popping up preview when pressing C-h.

Don't exit the minibuffer when the call to
register-read-with-preview-fancy is triggered by C-h.

* lisp/register.el (register-read-with-preview-fancy): Do it.

12 months agoMove java/incrementing-version-code to AndroidManifest.xml.in
Po Lu [Wed, 5 Mar 2025 06:59:19 +0000 (14:59 +0800)]
Move java/incrementing-version-code to AndroidManifest.xml.in

* admin/admin.el (admin-android-version-code-regexp): New
variable.
(set-version): Modify AndroidManifest.xml.in instead.

* java/AndroidManifest.xml.in (Version-code): Define version
code.

* java/incrementing-version-code: Delete file.

12 months agoProvide an Android version code derived from the Emacs version
Peter Oliver [Mon, 27 Jan 2025 10:59:19 +0000 (10:59 +0000)]
Provide an Android version code derived from the Emacs version

The version code is intended to be an integer that increments
for each Android package release
(https://developer.android.com/studio/publish/versioning#versioningsettings).

If we keep this updated under version control, then F-Droid (a
third-party Android package repository), can watch for that, and
use it to automatically build Emacs packages for Android each
time a new Emacs release is tagged
(https://f-droid.org/en/docs/Build_Metadata_Reference/#UpdateCheckData).

* admin/admin.el (set-version): Update version code in
java/incrementing-version-code
* java/incrementing-version-code: New file containing an Android
version code corresponding to the current Emacs version.
(bug#75809)

12 months ago; * lisp/register.el (register-use-preview): Doc fix (bug#76739).
Eli Zaretskii [Tue, 4 Mar 2025 15:23:16 +0000 (17:23 +0200)]
; * lisp/register.el (register-use-preview): Doc fix (bug#76739).

12 months ago; Improve documentation of 'shortdoc'
Eli Zaretskii [Tue, 4 Mar 2025 14:01:32 +0000 (16:01 +0200)]
; Improve documentation of 'shortdoc'

* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Fix doc
string and wording of prompt.  (Bug#76723)

12 months agoimage-dired: Don't croak on file names with regexp characters
Vitaliy Chepelev [Tue, 24 Sep 2024 04:25:13 +0000 (04:25 +0000)]
image-dired: Don't croak on file names with regexp characters

* lisp/image/image-dired-dired.el (image-dired-mark-tagged-files):
* lisp/image/image-dired-tags.el (image-dired-get-comment)
(image-dired-write-comments, image-dired-list-tags)
(image-dired-remove-tag, image-dired-write-tags): Quote file name
for search-forward-regexp.  (Bug#73445)

Copyright-paperwork-exempt: yes
(cherry picked from commit 7930fe2f44f50b6a7abf5fbe1218dcc15e85b28d)

12 months ago; * doc/emacs/android.texi (Android Software): Minor markup nits.
Po Lu [Tue, 4 Mar 2025 06:30:31 +0000 (14:30 +0800)]
; * doc/emacs/android.texi (Android Software): Minor markup nits.

12 months ago; * etc/PROBLEMS: Document the same problem here.
Po Lu [Tue, 4 Mar 2025 06:29:35 +0000 (14:29 +0800)]
; * etc/PROBLEMS: Document the same problem here.

12 months agoDocument requirements respecting XDG MIME databases on Android
Po Lu [Tue, 4 Mar 2025 06:24:56 +0000 (14:24 +0800)]
Document requirements respecting XDG MIME databases on Android

* doc/emacs/android.texi (Android Software): State that librsvg
requires a MIME database to display embedded images, and how to
acquire such a database.

12 months ago; (completion-preview--try-table): Propagate extra properties.
Eshel Yaron [Sun, 2 Mar 2025 07:03:04 +0000 (08:03 +0100)]
; (completion-preview--try-table): Propagate extra properties.

* lisp/completion-preview.el
(completion-preview--try-table): Let-bind
'completion-extra-properties' to completion properties
that the completion backend (capf) provides, so that these
properties take effect when querying the completion table.
* test/lisp/completion-preview-tests.el
(completion-preview-propagates-properties): Add test.

12 months agoImprove instructions for running with -fsanitize=address (bug#76393)
Pip Cet [Sat, 1 Mar 2025 21:39:23 +0000 (21:39 +0000)]
Improve instructions for running with -fsanitize=address (bug#76393)

* etc/DEBUG (ASAN_OPTIONS): Add 'detect_stack_use_after_return=0'
requirement.  Remove obsolete unexec commentary.

(cherry picked from commit 1e84a8767692f9f3a3bc37eba8eeb8f9d537322d)

12 months ago; Don't document package-x.el
Stefan Kangas [Sun, 2 Mar 2025 04:09:37 +0000 (05:09 +0100)]
; Don't document package-x.el

* doc/lispref/package.texi (Package Archives): Delete documentation on
package-x.el, since it's obsolete in Emacs 31 and we want to discourage
its use.

12 months ago; Document spurious warnings on macOS 15
Stefan Kangas [Sun, 2 Mar 2025 03:34:27 +0000 (04:34 +0100)]
; Document spurious warnings on macOS 15

* etc/PROBLEMS: Document spurious warnings on macOS 15.  (Bug#73382)

12 months agoFix the use of xref-window-local-history together with Xref buffer
Dmitry Gutov [Sun, 2 Mar 2025 03:22:56 +0000 (05:22 +0200)]
Fix the use of xref-window-local-history together with Xref buffer

* lisp/progmodes/xref.el (xref--push-markers): Temporarily
restore the selected window as well, using the value from the
new argument (bug#76565).  Update both callers.

12 months agocompleting-read-multiple: Fix support for ":" as separator
Dmitry Gutov [Sun, 2 Mar 2025 03:13:14 +0000 (05:13 +0200)]
completing-read-multiple: Fix support for ":" as separator

* lisp/emacs-lisp/crm.el (completing-read-multiple):
Do not search for separators inside the prompt (bug#76461).

12 months ago; Improve docstring of cl-check-type
Stefan Kangas [Sun, 2 Mar 2025 03:11:55 +0000 (04:11 +0100)]
; Improve docstring of cl-check-type

* lisp/emacs-lisp/cl-macs.el (cl-check-type): Improve docstring.

12 months ago; * lisp/progmodes/java-ts-mode.el (treesit-node-end): Declare.
Eli Zaretskii [Sat, 1 Mar 2025 14:42:50 +0000 (16:42 +0200)]
; * lisp/progmodes/java-ts-mode.el (treesit-node-end): Declare.

12 months agoFix 'M-q' in 'makefile-mode'
Eli Zaretskii [Sat, 1 Mar 2025 14:04:52 +0000 (16:04 +0200)]
Fix 'M-q' in 'makefile-mode'

* lisp/progmodes/make-mode.el (makefile-mode-map): Bind 'M-q' to
'fill-paragraph', as 'prog-mode's default binding is not
appropriate for Makefile's syntax.  (Bug#76641)

12 months ago; Improve documentation of 'rmail-movemail-program'
Eli Zaretskii [Sat, 1 Mar 2025 13:45:57 +0000 (15:45 +0200)]
; Improve documentation of 'rmail-movemail-program'

* lisp/mail/rmail.el (rmail-movemail-program):
* doc/emacs/rmail.texi (Movemail): Document how to change the
value of 'rmail-movemail-program' safely.  (Bug#76595)

12 months ago; Cleanup sexp things in 'lua-ts-mode'
john muhl [Mon, 24 Feb 2025 21:21:38 +0000 (15:21 -0600)]
; Cleanup sexp things in 'lua-ts-mode'

* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove some
nonsensical entries from 'treesit-thing-settings'.
* test/lisp/progmodes/lua-ts-mode-resources/movement.erts:
Add missing tests for 'backward-sexp'.  (Bug#76534)

12 months agoFix go-ts-mode const_spec highlighting (Bug#76330)
Randy Taylor [Sun, 16 Feb 2025 20:51:43 +0000 (15:51 -0500)]
Fix go-ts-mode const_spec highlighting (Bug#76330)

* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Handle multiple const_spec identifiers.
* test/lisp/progmodes/go-ts-mode-resources/font-lock.go:
Add test case.

12 months ago; Document what happens when 'display' and 'invisible' props clash
Eli Zaretskii [Sat, 1 Mar 2025 10:59:32 +0000 (12:59 +0200)]
; Document what happens when 'display' and 'invisible' props clash

* doc/lispref/display.texi (Replacing Specs, Overlay Properties)
(Invisible Text): Document that 'invisible' is ignored when
'display' property covers the same text.  (Bug#76658)

12 months agokeymaps.texi: Move "Changing Key Bindings" section up
Stefan Kangas [Sat, 1 Mar 2025 05:34:00 +0000 (06:34 +0100)]
keymaps.texi: Move "Changing Key Bindings" section up

* doc/lispref/keymaps.texi (Changing Key Bindings): Move section
up.  (Bug#52821)

12 months agokeymaps.texi: Move "Key Sequences" section down
Stefan Kangas [Sat, 1 Mar 2025 05:28:17 +0000 (06:28 +0100)]
keymaps.texi: Move "Key Sequences" section down

* doc/lispref/keymaps.texi (Key Sequences): Move section
down.  (Bug#52821)

12 months agoImprove process-get/process-put docstrings
Stefan Kangas [Sat, 1 Mar 2025 01:01:30 +0000 (02:01 +0100)]
Improve process-get/process-put docstrings

* lisp/subr.el (process-get, process-put): Explain the purpose of these
functions in the docstring.

12 months agoMerge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs into emacs-30
Michael Albinus [Fri, 28 Feb 2025 17:04:35 +0000 (18:04 +0100)]
Merge branch 'emacs-30' of git.sv.gnu.org:/srv/git/emacs into emacs-30

12 months agoFix recent change in diff-no-select
Michael Albinus [Fri, 28 Feb 2025 17:03:54 +0000 (18:03 +0100)]
Fix recent change in diff-no-select

* lisp/vc/diff.el (diff-no-select): Keep initial default directory
in *Diff* buffer.

12 months agoPrevent rare freeze on Android 4.2 through 4.4
Po Lu [Fri, 28 Feb 2025 14:36:08 +0000 (22:36 +0800)]
Prevent rare freeze on Android 4.2 through 4.4

* src/android.c (android_run_select_thread, android_init_events)
(android_select): Enable self-pipes on all Android versions <= 21.
The Android C library provides a functioning pselect on these
systems, but it does not apply the signal mask atomically.
(android_run_select_thread): Correct typo.  This never produced
any adverse consequences, as the relevant signals would already
have been blocked by `setupSystemThread'.

Do not merge to master.

12 months ago* lisp/proced.el (proced-<): Check, that NUM1 and NUM2 are numbers.
Michael Albinus [Fri, 28 Feb 2025 14:32:35 +0000 (15:32 +0100)]
* lisp/proced.el (proced-<): Check, that NUM1 and NUM2 are numbers.

(Bug#76549)

12 months ago; * src/keymap.c: Fix last change (bug#75219).
Eli Zaretskii [Sun, 12 Jan 2025 06:24:39 +0000 (08:24 +0200)]
; * src/keymap.c: Fix last change (bug#75219).

(cherry picked from commit 412c1a4f0e1df8c82bd94f02e21c1ef62b3d53d5)

12 months agoFix mouse-2 clicks on mode line and header line
Eli Zaretskii [Sun, 12 Jan 2025 06:22:24 +0000 (08:22 +0200)]
Fix mouse-2 clicks on mode line and header line

* src/keymap.c (Fcurrent_active_maps): For clicks on mode-line and
header-line, always override the keymaps at buffer position.
(Bug#75219)

(cherry picked from commit c41ea047a434710c4b7bc8280695c83fbe5fff35)

12 months agoRecommend secure-hash in md5 docstring
Stefan Kangas [Fri, 28 Feb 2025 04:21:48 +0000 (05:21 +0100)]
Recommend secure-hash in md5 docstring

* src/fns.c (Fmd5): Repeat explanation from manual about md5 being
"semi-obsolete", and recommend using secure-hash instead.

12 months agoImprove docstring of add-hook and remove-hook
Tomas Nordin [Thu, 27 Feb 2025 21:06:25 +0000 (22:06 +0100)]
Improve docstring of add-hook and remove-hook

* lisp/subr.el (add-hook, remove-hook): Remove detail about setting to
nil and talk about functions instead of hooks.  (Bug#72915)

12 months ago* lisp/subr.el (read-key): Add 'tab-line' (bug#76408).
Jared Finder [Wed, 19 Feb 2025 07:41:44 +0000 (09:41 +0200)]
* lisp/subr.el (read-key): Add 'tab-line' (bug#76408).

Backport:
(cherry picked from commit 0c8abe8bb5072c46a93585cb325c249f85f3d9c2)